<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Cache-Control" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<meta http-equiv="X-UA-Compatible" content="E=edge;chrome=1" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<title>嘉华金融</title>
        <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/reset.css">
	    <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/weui.min.css">
	    <link rel="stylesheet" type="text/css" href="<%=path%>/static/css/index.css">
	    <script type="text/javascript" src="<%=path%>/static/js/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="<%=path%>/static/js/weui.min.js"></script>
		<script type="text/javascript" src="<%=path%>/static/layer/layer.js"></script>
		<script type="text/javascript" src="<%=path%>/static/js/index.js"></script>
		<script type="text/javascript" src="<%=path%>/static/js/city-data.js"></script>
		<script type="text/javascript" src="<%=path%>/static/js/uploader.js"></script>
		<style>
	      .weui-uploader__bd {
	        position: relative;
	        width: 80px;
	    	height: 81px;
	      }
	      .weui-uploader__input-box {
	        position: absolute;
		    top: 0;
		    left: 0;
	        /*float: none;*/
	      }
	      .weui-uploader__input-box.change:before {
	            width: 0;
	            height: 0;
	      }
	      .weui-uploader__input-box.change:after {
	            width: 0px;
	            height: 0px;
	        }
	  </style>	
</head>
<body>
	<body>
	<div>
		<div class="header">
			<div><div class="back"></div></div>
			<div>身份认证</div>
			<div><!-- <div class="user-img"></div> --></div>
		</div>
		<div class="main">
			<div class="enterprise-wrap">
				<div class="prompt">身份认证的会员可推广所属分销商，获得更多分润收益</div>
				<div class="enterprise-form">
					<div class="weui-cells weui-cells_form">
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">认证类型</label></div>
			                <div class="weui-cell__bd select-wrap">
			                	<img src="<%=path%>/static/img/member/city2.png" class="select-img">
			                    <select  name="select2" class="weui-select">
			                        <option value="2">个人</option>
			                        <option value="1">企业</option>
			                    </select>
			                </div>
			            </div>
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input person-name person" pl="请输入姓名">
			                </div>
			            </div>
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">身份证号</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input person-idcard person" pl="请输入身份证号码">
			                </div>
			            </div>
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">城市</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input person-city city" placeholder="请选择城市" id='userResult' readonly>
			                </div>
			                <div class="weui-cell__ft">
			                	<div id="showPicker" class="right choose-city  right-code">
									<div  class="city-code"></div>
								</div>
			                </div>
			            </div>
			            <div class="weui-cell">
			                <div class="weui-cell__hd upload-label"><label class="weui-label">身份证附件</label></div>
			                <div class="weui-cell__bd">
								<div class="weui-uploader__bd">
                                    <ul class="weui-uploader__files uploader-file1">
                                    </ul>
                                    <div class="weui-uploader__input-box">
                                        <input id="uploaderInput" class="weui-uploader__input js_file input-file1" type="file" accept="image/*" multiple>
                                    </div>
                                </div>
			                </div>
			            </div>
        			<div class="modify-btn-wrap border-bottom">
        				<div class="error-content company-error"></div>
			        	<div class="modify-btn company-btn h-btn"><a>认证</a></div>
			        </div>  
				</div>
			</div>
		</div>
		<div class="js_dialog" id="iosDialog2" style="display:none">
            <div class="weui-mask"></div>
            <div class="weui-dialog">
                <div class="weui-dialog__bd">图片太大，不允许上传</div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary" id="closeImg">知道了</a>
                </div>
            </div>
        </div>
	</div>
	<script type="text/javascript">
	var path="<%=path%>"
	$("#closeImg").click(function() {
		$("#iosDialog2").css("display","none")
	});
	$('.person').keyup(function(){
		var fz = 0;
		$('.person').each(function(){
			if($(this).val()=="" || $(this).val() == $(this).attr("pl") ){
				$(".h-btn").removeClass("active")
				return;
			}
			fz++;
		})
		if(fz == $('.person').length && $(".city").val() !== "" && $(".uploader-file1").children().length>0){
			$(".h-btn").addClass("active")
		}
	})
	$('#showPicker').on('click', function () {
	    weui.picker(cityData, {
	        onConfirm: function (result) {
	        	$("#userResult").val(cityData[result].label)
	        	$("#userResult").css('color',"#000");
	        	$('.person').each(function() {
	        		if($(this).val() == $(this).attr("pl") || $(".uploader-file1").children().length == 0) {
	        			$(".h-btn").removeClass("active");
	        		}else {
	        			$(".h-btn").addClass("active");
	        		}
	        	})
	        }
	    });
	});
	$('.input-file1').on("change", function(e){
		$('.person').each(function(){
			if($(this).val() == $(this).attr("pl") || $(".city").val() == ""){
				$(".h-btn").removeClass("active")
				return;
			}
			$(".h-btn").addClass("active");
		})
	})
	
	$(".weui-select").change(function(){
		window.location=path+"/member/enterprise.html";
	});
	 $('.back').on('click', function () {
         window.location=path+"/member/memberCenter.html";
      });
	</script>
</body>
</html>
